from flask import Flask
import json

app = Flask(__name__)

"""指定请求方式"""
@app.route('/', methods=['POST'])
def hello():
    """返回所有路由"""
    rules = app.url_map.iter_rules()
    return json.dumps({rule.endpoint: rule.rule for rule in rules})

if __name__ == '__main__':
    app.run()


